<?php
 namespace App\Libs\Oss;

use OSS\Core\OssException;
use OSS\OssClient;

class BzOss{
	
	/**
	 * OSS文件操作
	 */
	public static function ossObject()
	{
		$accessKeyId = env('OSS_ACCESS_ID');
		$accessKeySecret = env('OSS_ACCESS_KEY');
		$endpoint = env('OSS_END_POINT');
		$ossClient = null;
		try {
			$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
		} catch (OssException $e) {
			\Log::info('oss_ept:'.$e->getMessage());
			return null;
		}
		return $ossClient;
	}
	
}
